function reversStr(str) {
    let reversed = '';
    for (const char of str) {
        reversed = char + reversed;
    }
    return reversed;
}

console.log(reversStr('hello'));